/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.freedoit.util;

import java.io.File;
import org.apache.log4j.Logger;

/**
 *
 * @author wanglei
 */
public class LogUtils {
    

    public static final String FREEDOIT_CONFIG_DIR = 
            System.getProperty("user.home") + File.separator + ".freedoit";
    
    public static Logger getLogger(Class _class) {
        return Logger.getLogger(_class);
    }
    static
    {
        // freedoit dir create
        File fDir = new File(FREEDOIT_CONFIG_DIR + "/logs");
        if (!fDir.exists() && !fDir.mkdirs()) { // not exist, then create but if failed. exit.
            System.exit(-1);
        }
    }
}
